from gevent import monkey
import gevent
import time
monkey.patch_all()

def work(n):
    while True:
        print("这是第{}个".format(n))
        time.sleep(1)

def work1(n):
    while True:
        print("这是第{}个".format(n))
        time.sleep(1)

if __name__ == "__main__":
    gevent.joinall([
        gevent.spawn(work, 1),
        gevent.spawn(work1, 2)
        ])

